Print 'START: Crear la tabla Compras'
CREATE TABLE MARAVILLA_SQL.Compras(
	intIdCompra	int	IDENTITY(1, 1)	NOT NULL,
	datFecha_Compra	datetime NOT NULL,
	datDevolucion_Fecha	datetime,
	datEntregado_Fecha datetime,
	intIdCliente	int	NOT NULL,
	intIdGroupon	int	NOT NULL,
	varMotivoDevolucion	nvarchar(200),
	bitCanjeado bit NOT NULL DEFAULT 0,	
	CONSTRAINT PK_Compras PRIMARY KEY CLUSTERED
	(
		IntIdCompra ASC
	)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
	, FOREIGN KEY (intIdCliente) REFERENCES MARAVILLA_SQL.Clientes(IntIdCliente)
	, FOREIGN KEY (intIdGrupon) REFERENCES MARAVILLA_SQL.Groupons(IntIdGroupon)
) ON [PRIMARY]

GO
Print 'END: Crear la tabla Compras'